package com.pan.hisystem.pojo;

import com.pan.hisystem.utils.DrugsUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.HashMap;
import java.util.List;

/**
 * @Description 药品集合
 * @Author qingyang
 * @Date 2022/4/10 21:39
 * @Version 1.0
 **/
@Data
public class DrugParam {


    public static HashMap<String,Integer> drugsMap=new HashMap<>();

    public DrugParam(){}

    public static void getDrugsMap(){
        DrugsUtil drugsUtil=new DrugsUtil();
        List<Drug> drugList=drugsUtil.getDrugs();
        for (Drug drug : drugList) {
            DrugParam.drugsMap.put(drug.getId().toString(),drug.getStorageQuantity());
        }
    }


}
